<template>
  <div id="login">
    <el-row class="logintitle"> 
      <el-col :span="24">
      <span>智能质检反馈控制系统</span></el-col>
    </el-row>
    <el-row type="flex" class="loginform" justify="space-around">
      <el-col :span="8">
        <div class="grid-loginform bg-purple">
          <el-form :label-position="top" label-width="80px" :model="loginForm">
            <el-form-item label="用户名">
              <el-input v-model="loginForm.username" length=10></el-input>
            </el-form-item>
            <el-form-item label="密码">
              <el-input type="password" v-model="loginForm.password"></el-input>
            </el-form-item>
      <el-form-item>
    <el-button type="primary" @click="login">登录</el-button>
    <el-button @click="resetForm">取消</el-button>
  </el-form-item>
          </el-form>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  import Router from 'vue-router'
  var router = new Router()
  
  export default {
    name: 'Login',
    methods: {
      login: function() {
        this.$router.push({
          path: 'home'
        })
      },
      resetForm: function() {
        this.loginForm = {
          username: '',
          password: ''
        }
      }
    },
    data() {
      return {
       loginForm: {
          username: '',
          password: ''
        }
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

  .logintitle{
    font-size:60px;
    text-align:center;
  }

  .loginform{
    margin-top:40px;
  }



  /* #login .el-form-item >>> label{
    color:#ffffff;
  } */
  
  .row-bg {
    margin-top: 100px;
  }
  
  .bg-purple {
    background-color: transparent;
    text: #ffffff;
  }
  
  .grid-content {
    border-radius: 4px;
    min-height: 100px;
  }

  .grid-loginform{
    padding-top:10px;
    padding-bottom:10px;
    border-radius: 4px;
    background-color:lightblue;
  }

  .grid-loginform .el-input{
    width:250px
  }

  
</style>
